package com.client;

import com.core.DelayCore;
import com.domain.CircularQueue;
import com.domain.Function;
import com.domain.Task;

import java.util.Random;

/**
 * 描述
 * 时间 2017-10-23 20:30
 * 作者 肖亦鸣
 */
public class MainTest {
    public static void main(String[] args) {

        DelayCore delayCore = DelayCore.getInstance();

        delayCore.init();

        while (true) {
            int nextInt = new Random().nextInt(60);
            Task task = new Task();
            task.setId(nextInt);
            task.setIndex(nextInt);
            task.setFunction(new Function());

            delayCore.add(task);

            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

}
